package com.alan.derbydemo.dao;

import com.alan.derbydemo.entity.Joins;
import com.alan.derbydemo.entity.Person;
import com.alan.derbydemo.entity.Svse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author alan
 * @description:
 * @date 2021/4/28
 */
@Mapper
public interface PersonMapper {
    @Select("select * from user")
    List<Person> getPerson();

    @Select("select * from svse")
    List<Svse> getSvse();

    @Select("select * from info")
    List<Joins> getInfo();

    @Select("select t1.uid,t1.Uname AS n1,t1.Upass AS p1,t2.uid id2,t2.Uname n2,t2.Upass p2" +
            " from svse t1 " +
            "left join info t2 " +
            "on t1.uid = t2.uid")
    List<Joins> Join();
}
